Open
Conversation
Implemented the Unit.hpp and then add the base in the Real.hpp/Real.cpp Added a function ConvertTo for the future when we have to convert between Units Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Implemented the Unit.hpp and then add the base in the Variable.hpp/Variable.cpp Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Installed boost and introduced boost into Real.cpp. Basic Implementation of ConvertTo function and added a private GetFactor function. Still needs unit testing for this! Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Added some minor Units, adjusted some minor if condition issues in Real.cpp. Added some basic TestCases in AddTests.cpp Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Introduce the UnitGraph.hpp for more robust and complex conversion instead of the manual conversion conditions. This will be the template hpp. Building the chain of equation conversion using Graph Algo. Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Implemented the UnitGraph.cpp. Every Vertex represents the unit with a given index and edge represents the factor of conversion. Initializing standard BFS Graph Algorthim to search the graph. Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Reference to the Global static Instance of the UnitGraph so we can reuse the conversion Algorthim without creating an instance each time. Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Made a static globalGraph and a central place for all the conversion to be added and initialized only once Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Revised the Real.hpp/cpp to use UnitGraph and replace the original template of convertTo. Edit Some Test Cases. Signed-off-by: Jary Chen <jarychenu24@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft Pull Request for this issue.
#134